Adwaita: uneven paddings on .text-button.image-button
authorLapo Calamandrei <calamandrei@gmail.com>
Sat, 13 Sep 2014 10:25:46 +0000 (12:25 +0200)
committerLapo Calamandrei <calamandrei@gmail.com>
Sat, 13 Sep 2014 10:27:38 +0000 (12:27 +0200)
We want buttons with an icon and text to have the padding of the
text-button on the label side and on the image-button on the icon
side.

gtk/resources/theme/Adwaita/_common.scss
gtk/resources/theme/Adwaita/gtk-contained-dark.css
gtk/resources/theme/Adwaita/gtk-contained.css
gtk/resources/theme/Adwaita/parse-sass.sh

index 9bc7656b02ffc351e9c40202855a86e92ae0036a..76fcb82320e8455e41afe1e8585c56be87143dc3 100644 (file)
@@ -506,6 +506,16 @@ $_dot_color: if($variant=='light', $selected_bg_color,
     padding-right: 16px;
   }
 
+  &.text-button.image-button {
+    // those buttons needs uneven horizontal padding, we want the icon side
+    // to have the image-button padding, while the text side the text-button
+    // one, so we're adding the missing padding to the label depending on
+    // its position inside the button
+    padding: 5px 8px 6px; // same as .button
+    GtkLabel:first-child { padding-left: 8px; }
+    GtkLabel:last-child { padding-right: 8px; }
+  }
+
   .stack-switcher > & {
     // to position the needs attention dot, padding is added to the button
     // child, a label needs just lateral padding while an icon needs vertical
index 05748a51fb0555a245f8b5eef4f06bc72f878a97..3bd93d5c83eeb7d45f26ded57882ae0e00b6f6b0 100644 (file)
@@ -820,6 +820,18 @@ GtkCalendar.header .button.titlebutton {
   GtkCalendar.header .text-button.button.titlebutton {
     padding-left: 16px;
     padding-right: 16px; }
+  .button.text-button.image-button, .header-bar .text-button.titlebutton.button,
+  .titlebar .text-button.titlebutton.button,
+  GtkCalendar.header .text-button.titlebutton.button {
+    padding: 5px 8px 6px; }
+    .button.text-button.image-button GtkLabel:first-child, .header-bar .text-button.titlebutton.button GtkLabel:first-child,
+    .titlebar .text-button.titlebutton.button GtkLabel:first-child,
+    GtkCalendar.header .text-button.titlebutton.button GtkLabel:first-child {
+      padding-left: 8px; }
+    .button.text-button.image-button GtkLabel:last-child, .header-bar .text-button.titlebutton.button GtkLabel:last-child,
+    .titlebar .text-button.titlebutton.button GtkLabel:last-child,
+    GtkCalendar.header .text-button.titlebutton.button GtkLabel:last-child {
+      padding-right: 8px; }
   .stack-switcher > .button > GtkLabel, .header-bar .stack-switcher > .button.titlebutton > GtkLabel,
   .titlebar .stack-switcher > .button.titlebutton > GtkLabel,
   GtkCalendar.header .stack-switcher > .button.titlebutton > GtkLabel {
@@ -4167,5 +4179,3 @@ GtkCalendar.header .menuitem.titlebutton.button:selected, .list-row:selected {
 @define-color wm_button_active_color_b shade(#393f3f, 0.89);
 @define-color wm_button_active_color_c shade(#393f3f, 0.9);
 @define-color content_view_bg #292929;
-
-/*# sourceMappingURL=gtk-contained-dark.css.map */
index 75dec98fbd454795fdf068b16fd90fed7ce78065..20cb00da25fd1fa64ca39780d04d3a2383a93394 100644 (file)
@@ -812,6 +812,18 @@ GtkCalendar.header .button.titlebutton {
   GtkCalendar.header .text-button.button.titlebutton {
     padding-left: 16px;
     padding-right: 16px; }
+  .button.text-button.image-button, .header-bar .text-button.titlebutton.button,
+  .titlebar .text-button.titlebutton.button,
+  GtkCalendar.header .text-button.titlebutton.button {
+    padding: 5px 8px 6px; }
+    .button.text-button.image-button GtkLabel:first-child, .header-bar .text-button.titlebutton.button GtkLabel:first-child,
+    .titlebar .text-button.titlebutton.button GtkLabel:first-child,
+    GtkCalendar.header .text-button.titlebutton.button GtkLabel:first-child {
+      padding-left: 8px; }
+    .button.text-button.image-button GtkLabel:last-child, .header-bar .text-button.titlebutton.button GtkLabel:last-child,
+    .titlebar .text-button.titlebutton.button GtkLabel:last-child,
+    GtkCalendar.header .text-button.titlebutton.button GtkLabel:last-child {
+      padding-right: 8px; }
   .stack-switcher > .button > GtkLabel, .header-bar .stack-switcher > .button.titlebutton > GtkLabel,
   .titlebar .stack-switcher > .button.titlebutton > GtkLabel,
   GtkCalendar.header .stack-switcher > .button.titlebutton > GtkLabel {
@@ -4326,5 +4338,3 @@ GtkCalendar.header .menuitem.titlebutton.button:selected, .list-row:selected {
 @define-color wm_button_active_color_b shade(#ededed, 0.89);
 @define-color wm_button_active_color_c shade(#ededed, 0.9);
 @define-color content_view_bg #ffffff;
-
-/*# sourceMappingURL=gtk-contained.css.map */
index 248648080283bc7c155122dfd31f24b2bb24df6f..333bbc5c63ea8ed707aa747710732395d8061fcf 100755 (executable)
@@ -1,3 +1,3 @@
 #!/usr/bin/bash
 
-sass --update .
+sass --update --sourcemap=none .